package com.hanggold.lambda;

import java.util.function.Consumer;

public class ConsumeDemp {

    public static void main(String[] args) {

        Consumer consumer = System.out::println;

        Consumer<String> consumer1 = ConsumeDemp::echo;

        consumer1.andThen(consumer);

        consumer.accept("xx");


    }

    public static void echo(String  message){

        System.out.println("message: "+ message);
    }








}
